﻿using System;

namespace IntoNails.Infrastructure.InteractionRequests
{
    public class GenericInteractionRequest<T> : IGenericInteractionRequest<T>
    {
        public event EventHandler<RequestRaisedEventArgs<T>> Raised;

        public void Raise(T entity, Action<T> callback, Action cancelCallback)
        {
            this.Raised(this, new RequestRaisedEventArgs<T>(entity, callback, cancelCallback));
        }

        public void Raise(T entity, object state, Action<T> callback, Action cancelCallback)
        {
            this.Raised(this, new RequestRaisedEventArgs<T>(entity, state, callback, cancelCallback));
        }
    }
}
